<!-- NG-ZORRO -->

<div class="dirInputBar">
    <nz-input-group nzSearch nzSize="large" [nzAddOnAfter]="suffixButton" (keyup)="onKeypress($event)">
      <input type="text" [(ngModel)]="inputValue" nz-input placeholder="请输入目录, 如 C:/test 按下回车键"/>
    </nz-input-group>
    <ng-template #suffixButton>
      <button nz-button nzType="primary" nzSize="large" nzSearch
              (click)="onStart(template)">{{loading ? '停止扫描' : '开始扫描'}}</button>
    </ng-template>

    <ul *ngIf="list.length > 0" nz-list [nzDataSource]="list" nzBordered nzSize="large">
      <nz-list-header>准备扫描的目录数量: {{list.length}}</nz-list-header>
      <li nz-list-item *ngFor="let item of list" nzNoFlex>
        <ul nz-list-item-actions>
          <nz-list-item-action>
            <a (click)="delDir(item)">删除</a>
          </nz-list-item-action>
        </ul>
        {{ item }}
      </li>
    </ul>
    <nz-spin class="scanFilePath" *ngIf="loading" nzTip="处理中" nzSize="large">
      <nz-alert
        nzType="info"
        [nzMessage]="scanFilePath"
      ></nz-alert>
    </nz-spin>
    <nz-result *ngIf="scanFileComplete"
               nzStatus="success"
               nzTitle="本次一共扫描 {{scanFileNum}} 个文件"
               nzSubTitle="共耗时 {{scanSecond}} "
    >
    </nz-result>
</div>

<div class="fileModelList">
  <app-file-list [listOfData]="fileModel"></app-file-list>
</div>
<ng-template #template>
  <div class="ant-notification-notice-content">
    <div class="ant-notification-notice-with-icon">
          <span class="ant-notification-notice-icon">
            <span nz-icon nzType="smile" style="color: rgb(16, 142, 233);"></span>
          </span>
      <div class="ant-notification-notice-message">{{notifyMsg}}</div>
    </div>
  </div>
</ng-template>

